<?php


namespace App\Repositories;


use App\Models\Express as Model;
use LTools\Repositories\RepositoryAbstract;

class Express extends RepositoryAbstract
{
    /**
     * Express constructor.
     * @param Model $model
     * @author luffyzhao@vip.126.com
     */
    public function __construct(Model $model)
    {
        $this->model = $model;
    }

    /**
     * @param $id
     * @param $status
     * @return \Illuminate\Database\Eloquent\Model
     * @author luffyzhao@vip.126.com
     */
    public function status($id, $status){
        $model = $this->find($id);
        $model->setAttribute('status', $status);
        $model->save();
        return $model;
    }
}